using Fusion.Utilities.Generics;
using System;
using System.Collections.Generic;
using UnityEngine;

namespace Fusion.Hotfix.Mono.LifeCycle
{
    public static class LifeCycleConfigs
    {
        public static readonly OrderDictionary<string, Type[]> MethodTypes = new OrderDictionary<string, Type[]>()
        {
            { "Update", null },
            { "FixedUpdate", null },
            { "LateUpdate", null },
            { "OnDestroy", null },
            //{ "OnEnable", null },
            //{ "OnDisable", null },
            { "OnTriggerEnter", new Type[] { typeof(Collider) } },
            { "OnTriggerExit", new Type[] { typeof(Collider) } },
            { "OnTriggerStay", new Type[] { typeof(Collider) } },
            { "OnCollisionEnter", new Type[] { typeof(Collision) } },
            { "OnCollisionExit", new Type[] { typeof(Collision) } },
            { "OnCollisionStay", new Type[] { typeof(Collision) } },
            { "OnMouseEnter", null },
            { "OnMouseExit", null },
            { "OnMouseDown", null },
            { "OnMouseUp", null },
            { "OnMouseDrag", null },
            { "OnMouseOver", null },
            { "OnMouseUpAsButton", null },
            { "OnAnimatorMove", null },
            { "OnAnimatorIK", new Type[] { typeof(int) } },
            { "OnApplicationFocus", new Type[] { typeof(bool) } },
            { "OnApplicationQuit", null },
            { "OnAudioFilterRead", new Type[] { typeof(float[]), typeof(int) } },
            { "OnBecameInvisible", null },
            { "OnBecameVisible", null },
            { "OnApplicationPause", new Type[] { typeof(bool) } },
            { "OnBeforeTransformParentChanged", null },
            { "OnCanvasGroupChanged", null },
            { "OnCollisionEnter2D", new Type[] { typeof(Collision2D) } },
            { "OnCollisionExit2D", new Type[] { typeof(Collision2D) } },
            { "OnCollisionStay2D", new Type[] { typeof(Collision2D) } },
            { "OnControllerColliderHit", new Type[] { typeof(ControllerColliderHit) } },
            { "OnJointBreak", new Type[] { typeof(float) } },
            { "OnJointBreak2D", new Type[] { typeof(Joint2D) } },
            { "OnParticleCollision", new Type[] { typeof(GameObject) } },
            { "OnParticleSystemStopped", null },
            { "OnParticleTrigger", null },
            { "OnParticleUpdateJobScheduled", null },
            { "OnPostRender", null },
            { "OnPreCull", null },
            { "OnPreRender", null },
            { "OnRectTransformDimensionsChange", null },
            { "OnRectTransformRemoved", null },
            { "OnRenderImage", new Type[] { typeof(RenderTexture), typeof(RenderTexture) } },
            { "OnRenderObject", null },
            { "OnTransformChildrenChanged", null },
            { "OnTransformParentChanged", null },
            { "OnTriggerEnter2D", new Type[] { typeof(Collider2D) } },
            { "OnTriggerExit2D", new Type[] { typeof(Collider2D) } },
            { "OnTriggerStay2D", new Type[] { typeof(Collider2D) } },
            { "OnWillRenderObject", null },
        };
    }
}
